﻿function StringBuilder(d)
{
 this.s = new Array(d);
 this.append=function(d)
 {
 this.s.push(d);
 return this;
 };
 this.toString=function()
 {
 return this.s.join('');
 };
 this.clear=function()
 {
 this.s=new Array();
 };
 this.appendFormat=function()
 {
 var n=arguments.length;
 if(n==0) return this;
 var f=arguments[0];
 if(n==1) return this.append(f);
 var arg=arguments[1];
 if(arg==null) arg='';
 var i,e,c,k,a_k=get_a_k[typeof(arg)];
 for (i=0 ; i < f.length;)
 {
 c=f.charAt(i);
 if (c == '{')
 {
 e=f.indexOf('}',i);
 k=f.substring(i+1,e);
 this.s.push(a_k(arguments,k));
 i=e+1;
 continue;
 }
 this.s.push(c);
 i++;
 }
 return this;
 }
};

var s = new StringBuilder();
s.clear();

function Car(sColor,iDoors,iMpg) 
{ 
　　this.color= sColor;
　　this.doors= iDoors;

　　this.mpg= iMpg;
　　this.drivers=new Array("Mike","Sue");
};
